[sunzi/development] doc/ideas: -moz-lineart-gradient in the role of ellipsis
by Jan Pokorný
commit 8e41d24f66a80ac2c600ac5a154fbc08841120cc
Author: Jan Pokorný <jpokorny(a)redhat.com>
Date: Wed Feb 29 11:44:32 2012 +0100
doc/ideas: -moz-lineart-gradient in the role of ellipsis
Signed-off-by: Jan Pokorný <jpokorny(a)redhat.com>
doc/ideas | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/doc/ideas b/doc/ideas
index 1fb6661..1c0d0a9 100644
--- a/doc/ideas
+++ b/doc/ideas
@@ -91,6 +91,9 @@ Templating work
- at least initially
- see JavaScript: jQuery + plugins: Flexigrid (see below)
+4. -moz-linear-gradient (transparent to opaque) for ends of items that do not
+ fit to the provided box
+
JavaScript
==========
11 years, 9 months
[sunzi/development] doc/concepts*: guard syntax file, minor changes
by Jan Pokorný
commit 5ab171975dc4239f91ecc9459d46d899cb730097
Author: Jan Pokorný <jpokorny(a)redhat.com>
Date: Mon Feb 27 16:51:56 2012 +0100
doc/concepts*: guard syntax file, minor changes
Signed-off-by: Jan Pokorný <jpokorny(a)redhat.com>
doc/concepts | 24 +++++++++++-------------
doc/concepts_syntax.vim | 47 +++++++++++++++++++++++++++--------------------
2 files changed, 38 insertions(+), 33 deletions(-)
---
diff --git a/doc/concepts b/doc/concepts
index 3dd1dcd..f72c9bd 100644
--- a/doc/concepts
+++ b/doc/concepts
@@ -164,12 +164,11 @@ concept ResourceProvider
# Q: also queried at runtime (i.e., dynamical)?
name
-# sample concrete Resource
-concept ResourceApache derives Resource:
- serverRoot
- configFile
- ...
-# similarly for other resources (not interesting in this context)
+>>> # sample concrete Resource (similarly for others)
+>>> concept ResourceApache derives Resource:
+>>> serverRoot
+>>> configFile
+>>> ...
# -- CONSTRAINTS (aka Resource Dependencies) -----------------------------
@@ -216,13 +215,12 @@ concept FenceDeviceStatus derives MetaEnumeration:
FdsActive
FdsInactive
-# sample concrete FenceDevice
-concept APCPowerSwitch derives SharedFenceDevice:
- port
- login
- password
- ...
-# similarly for other fence devices
+>>> # sample concrete FenceDevice (similarly for others)
+>>> concept APCPowerSwitch derives SharedFenceDevice:
+>>> port
+>>> login
+>>> password
+>>> ...
# -- FAILOVER DOMAINS ----------------------------------------------------
diff --git a/doc/concepts_syntax.vim b/doc/concepts_syntax.vim
index 016bbe5..3a68d6d 100644
--- a/doc/concepts_syntax.vim
+++ b/doc/concepts_syntax.vim
@@ -1,30 +1,37 @@
-" common prologue skipped
+" Language: concepts
+" Maintainer: Jan Pokorny <jpokorny(a)redhat.com>
+" Last Change: 2012
+" quit when a (custom) syntax file was already loaded
if exists("b:current_syntax")
- finish
+ finish
endif
-syn keyword conceptStatement concept derives
-syn keyword conceptKeyword backref
-syn keyword conceptRelation ManyToOne ManyToMany
-syn keyword conceptMeta MetaEnumeration MetaBool
+syn keyword conceptStatement concept derives
+syn keyword conceptKeyword backref
+syn keyword conceptRelation ManyToOne ManyToMany
+syn keyword conceptMeta MetaEnumeration MetaBool
-syn match conceptComment "\(#.*\)"
-syn match conceptKind "\(@.[^ ]*\)"
-syn match conceptLexical "\(<[a-zA-Z0-9_]\+>\)"
+syn match conceptComment "\(#.*\)"
+syn match conceptExStart "\(^>\+\)"
+syn match conceptFlag "\(@.[^ ]*\)"
+syn match conceptLexical "\(<[a-zA-Z0-9_]\+>\)"
+syn match conceptEllipsis "\(\.\.\.\)"
" blindly borrowed from python.vim
-syn match conceptDefinition "\%(\%(concept\|derives\)\s*\)\@<=\h\%(\w\)*"
-syn match conceptType "\%(\%(:\|(\)\s*\)\@<=\h\%(\w\)*\(\[\]\)\?"
+syn match conceptDefinition "\%(\%(concept\|derives\)\s*\)\@<=\h\%(\w\)*"
+syn match conceptType "\%(\%(:\|(\)\s*\)\@<=\h\%(\w\)*\(\[\]\)\?"
-highlight link conceptStatement Statement
-highlight link conceptKeyword Keyword
-highlight link conceptComment Comment
-highlight link conceptKind Define
-highlight link conceptMeta Include
-highlight link conceptRelation Operator
-highlight link conceptDefinition Identifier
-highlight link conceptType Structure
-highlight link conceptLexical String
+highlight link conceptEllipsis Todo
+highlight link conceptStatement Statement
+highlight link conceptKeyword Keyword
+highlight link conceptComment Comment
+highlight link conceptExStart Special
+highlight link conceptFlag Define
+highlight link conceptMeta Include
+highlight link conceptRelation Operator
+highlight link conceptDefinition Identifier
+highlight link conceptType Type
+highlight link conceptLexical String
"let b:current_syntax = "concepts"
11 years, 9 months
[sunzi/development] doc/concepts: fix unspotted repasted parts
by Jan Pokorný
commit 35ac31b305134e41b5564d3e4d97f5944067d7cd
Author: Jan Pokorný <jpokorny(a)redhat.com>
Date: Mon Feb 27 16:21:30 2012 +0100
doc/concepts: fix unspotted repasted parts
Me or my vim went probably a bit crazy when testing the syntax
file :-P
When doc/concepts to be diffed, please do it against
commit 197a05ebc21da03b4 directly.
BTW., previously, some references to pacemaker rng files
were added.
Signed-off-by: Jan Pokorný <jpokorny(a)redhat.com>
doc/concepts | 483 ----------------------------------------------------------
1 files changed, 0 insertions(+), 483 deletions(-)
---
diff --git a/doc/concepts b/doc/concepts
index b536380..3dd1dcd 100644
--- a/doc/concepts
+++ b/doc/concepts
@@ -1,60 +1,3 @@
-# vim: set syntax=concepts: <-- see concepts_syntax.vim
-#
-# This documents uses hypothetical free-form understandable
-# OOP-like language to define concepts in the project and
-# the relations amongst them (inspired by Elixir a bit).
-# There may be not (and probably is not) 1:1 correspondence
-# with how the things are seen by Pacemaker.
-#
-# Flags used so far:
-# <no flag> general attribute
-# @one-of contraint for the concept domain: at least one
-# specification must fit
-# @refcollection collection as a bunch of references to items
-# of other concept (aggregation/composition)
-# @refsingle single reference to item of other concept
-# (item forming aggregation/composition)
-# @enum enumeration values
-# @dynamic attributes highly dynamic
-#
-# Q: contraints for any undefined "singleval", e.g.
-# - UTF-8, 1-63 length, excluding ':'
-
-
-# -- META -----------------------------------------------------------------
-# MetaString and such have obvious meaning, omitted
-# Similarly, known lexical-based concepts marked <CONCEPT> and omitted
-
-
-# -- GENERAL --------------------------------------------------------------
-
-concept HostnameOrIP derives MetaString:
- @one-of
- <FQDN>
- <IPv4> # only single canonical notation (?)
- <IPv6> # beware: plenty of notations
-
-concept MulticastAddress derives MetaString:
- @one-of
- MulticastIPv4
- MulticastIPv6
-
-concept MulticastIPv4:
- # Q: restricted to range of D/E-class only?
-
-concept MulticastIPv6:
- # Q: restrictions here?
-
-concept SyslogFacility derives MetaEnumeration:
- @enum
- SfDaemon
- ...
-
-concept SyslogPriority derives MetaEnumeration:
- @enum
-
- SpInfo
-# vim: set filetype=concepts: <-- see concepts_syntax.vim
# vim: set filetype=concepts: <-- see concepts_syntax.vim
#
# This documents uses hypothetical free-form understandable
@@ -296,429 +239,3 @@ concept FailoverDomainRelationship:
@refsingle
node: ManyToOne(Node, backref=failoverDomains)
failoverDomain: ManyToOne(FailoverDomain, backref=registeredNodes)
-#
-# This documents uses hypothetical free-form understandable
-# OOP-like language to define concepts in the project and
-# the relations amongst them (inspired by Elixir a bit).
-# There may be not (and probably is not) 1:1 correspondence
-# with how the things are seen by Pacemaker.
-#
-# Flags used so far:
-# <no flag> general attribute
-# @one-of contraint for the concept domain: at least one
-# specification must fit
-# @refcollection collection as a bunch of references to items
-# of other concept (aggregation/composition)
-# @refsingle single reference to item of other concept
-# (item forming aggregation/composition)
-# @enum enumeration values
-# @dynamic attributes highly dynamic
-#
-# Q: contraints for any undefined "singleval", e.g.
-# - UTF-8, 1-63 length, excluding ':'
-
-
-# -- META -----------------------------------------------------------------
-# MetaString and such have obvious meaning, omitted
-# Similarly, known lexical-based concepts marked <CONCEPT> and omitted
-
-
-# -- GENERAL --------------------------------------------------------------
-
-concept HostnameOrIP derives MetaString:
- @one-of
- <FQDN>
- <IPv4> # only single canonical notation (?)
- <IPv6> # beware: plenty of notations
-
-concept MulticastAddress derives MetaString:
- @one-of
- MulticastIPv4
- MulticastIPv6
-
-concept MulticastIPv4:
- # Q: restricted to range of D/E-class only?
-
-concept MulticastIPv6:
- # Q: restrictions here?
-
-concept SyslogFacility derives MetaEnumeration:
- @enum
- SfDaemon
- ...
-
-concept SyslogPriority derives MetaEnumeration:
- @enum
- SpInfo
- SpDebug
- ...
-
-
-# -- CLUSTER --------------------------------------------------------------
-# see https://github.com/ClusterLabs/pacemaker/blob/master/xml/pacemaker-1.2.rng
-
-concept Cluster:
- # cluster
- name
- # fence
- fencePostFailDelay
- fencePostJoinDelay
- # network
- networkCommunication: ClusterNetworkCommunication
- # Pacemaker
- ...
- # logging
- globalLogging: ClusterGlobalLogging
- otherLogging: ClusterOtherLogging[]
- @dynamic
- # Q: is configuration version relevant?
- configurationVersion
- status: ClusterStatus
- @refcollection
- nodes: Node[]
-
-concept ClusterLogging:
- # TODO
-
-concept ClusterGlobalLogging derives ClusterLogging:
- logBuggingMessages: MetaBool
- syslog: MetaBool
- syslogFacility: SyslogFacility
- syslogPriority: SyslogPriority
-
-concept ClusterNetworkCommunication:
- @one-of
- CncUDPAuto
- CncUDPManual
- # Q: can be more addresses?
- multicastAddress: MulticastAddress[]
- CncUDPUnicast
-
-concept ClusterStatus:
- # Q: ?
-
-# Q: is this relevant after all?
-concept ClusterDaemon:
- name
- @dynamic
- status: ClusterDaemonStatus
-
-# Q: dtto
-concept ClusterDaemonStatus derives MetaEnumeration:
- @enum
- # Q: guessed for now
- CdsRunning
- CdsNotRunning
- CdsFailed
-
-
-# -- NODES ---------------------------------------------------------------
-
-concept Node:
- name: HostnameOrIP
- id
- @dynamic
- uptime
- status: NodeStatus
- @refsingle
- # Q: can node be active in more clusters (running or at least declaratively)?
- cluster: ManyToOne(Cluster, backref=nodes)
- @refcollection
- clusterDaemons: ClusterDaemon[]
- collocatedResources: Resource[]
- fenceDevices: FenceDevice[]
- failoverDomains: FailoverDomainRelationship[]
-
-concept NodeStatus derives MetaEnumeration:
- @enum
- # Q: guessed for now
- NsActive
- NsInactive
-
-
-# -- RESOURCES -----------------------------------------------------------
-# see https://github.com/ClusterLabs/pacemaker/blob/master/xml/resources-1.2.rng
-
-concept Resource:
- name
- class: ResourceClass
- type: ResourceType
- provider: ResourceProvider
- @refsingle
- location: ManyToOne(Node, backref=collocalatedResources)
- @refcollection
- constraints: Constraint[]
-
-concept ResourceClass derives MetaEnumeration:
- # Q: is this enumeration to be queried at runtime?
- enum:
-
-concept ResourceType derives MetaEnumeration:
- # Q: is this enumeration to be queried at runtime?
- enum:
-
-concept ResourceProvider
- # Q: also queried at runtime (i.e., dynamical)?
- name
-
-# sample concrete Resource
-concept ResourceApache derives Resource:
- serverRoot
- configFile
- ...
-# similarly for other resources (not interesting in this context)
-
-
-# -- CONSTRAINTS (aka Resource Dependencies) -----------------------------
-# see https://github.com/ClusterLabs/pacemaker/blob/master/xml/constraints-1.2.rng
-
-concept Contraint:
- name
- resourceConstraints: ResourceConstraint[]
-
-concept ResourceConstraint:
- dependency: ConstrainDependency
- quantification # Q: ?
- @refsingle
- resource: ManyToOne(Resource, backref=constraints)
- constraint: ManyToOne(Constraint, backref=resourceConstraints)
-
-concept ConstraintDependency derives MetaEnumeration:
- @enum
- CdColocation
- # Q: ?
-
-
-# -- FENCE DEVICES -------------------------------------------------------
-# see https://github.com/ClusterLabs/pacemaker/blob/master/xml/fencing.rng
-
-concept FenceDevice:
- name
- type
- hostname
- @dynamic
- status: FenceDeviceStatus
-
-concept SharedFenceDevice derives FenceDevice:
- @refcollection
- nodesUsing: ManyToMany(Node, backref=fenceDevices)
-
-concept NonSharedFenceDevice derives FenceDevice:
- @refcollection
- nodesUsing: ManyToOne(Node, backref=fenceDevices)
-
-concept FenceDeviceStatus derives MetaEnumeration:
- @enum
- # Q: guessed for now
- FdsActive
- FdsInactive
-
-# sample concrete FenceDevice
-concept APCPowerSwitch derives SharedFenceDevice:
- port
- login
- password
- ...
-# similarly for other fence devices
-
-
-# -- FAILOVER DOMAINS ----------------------------------------------------
-
-concept FailoverDomain:
- name
- prioritized: MetaBool
- restricted: MetaBool
- noFailBack: MetaBool
- @refcollection
- registeredNodes: FailoverDomainRelationship[]
-
-concept FailoverDomainRelationship:
- @refsingle
- node: ManyToOne(Node, backref=failoverDomains)
- failoverDomain: ManyToOne(FailoverDomain, backref=registeredNodes)
- SpDebug
- ...
-
-
-# -- CLUSTER --------------------------------------------------------------
-# see https://github.com/ClusterLabs/pacemaker/blob/master/xml/pacemaker-1.2.rng
-
-concept Cluster:
- # cluster
- name
- # fence
- fencePostFailDelay
- fencePostJoinDelay
- # network
- networkCommunication: ClusterNetworkCommunication
- # Pacemaker
- ...
- # logging
- globalLogging: ClusterGlobalLogging
- otherLogging: ClusterOtherLogging[]
- @dynamic
- # Q: is configuration version relevant?
- configurationVersion
- status: ClusterStatus
- @refcollection
- nodes: Node[]
-
-concept ClusterLogging:
- # TODO
-
-concept ClusterGlobalLogging derives ClusterLogging:
- logBuggingMessages: MetaBool
- syslog: MetaBool
- syslogFacility: SyslogFacility
- syslogPriority: SyslogPriority
-
-concept ClusterNetworkCommunication:
- @one-of
- CncUDPAuto
- CncUDPManual
- # Q: can be more addresses?
- multicastAddress: MulticastAddress[]
- CncUDPUnicast
-
-concept ClusterStatus:
- # Q: ?
-
-# Q: is this relevant after all?
-concept ClusterDaemon:
- name
- @dynamic
- status: ClusterDaemonStatus
-
-# Q: dtto
-concept ClusterDaemonStatus derives MetaEnumeration:
- @enum
- # Q: guessed for now
- CdsRunning
- CdsNotRunning
- CdsFailed
-
-
-# -- NODES ---------------------------------------------------------------
-
-concept Node:
- name: HostnameOrIP
- id
- @dynamic
- uptime
- status: NodeStatus
- @refsingle
- # Q: can node be active in more clusters (running or at least declaratively)?
- cluster: ManyToOne(Cluster, backref=nodes)
- @refcollection
- clusterDaemons: ClusterDaemon[]
- collocatedResources: Resource[]
- fenceDevices: FenceDevice[]
- failoverDomains: FailoverDomainRelationship[]
-
-concept NodeStatus derives MetaEnumeration:
- @enum
- # Q: guessed for now
- NsActive
- NsInactive
-
-
-# -- RESOURCES -----------------------------------------------------------
-# see https://github.com/ClusterLabs/pacemaker/blob/master/xml/resources-1.2.rng
-
-concept Resource:
- name
- class: ResourceClass
- type: ResourceType
- provider: ResourceProvider
- @refsingle
- location: ManyToOne(Node, backref=collocalatedResources)
- @refcollection
- constraints: Constraint[]
-
-concept ResourceClass derives MetaEnumeration:
- # Q: is this enumeration to be queried at runtime?
- enum:
-
-concept ResourceType derives MetaEnumeration:
- # Q: is this enumeration to be queried at runtime?
- enum:
-
-concept ResourceProvider
- # Q: also queried at runtime (i.e., dynamical)?
- name
-
-# sample concrete Resource
-concept ResourceApache derives Resource:
- serverRoot
- configFile
- ...
-# similarly for other resources (not interesting in this context)
-
-
-# -- CONSTRAINTS (aka Resource Dependencies) -----------------------------
-# see https://github.com/ClusterLabs/pacemaker/blob/master/xml/constraints-1.2.rng
-
-concept Contraint:
- name
- resourceConstraints: ResourceConstraint[]
-
-concept ResourceConstraint:
- dependency: ConstrainDependency
- quantification # Q: ?
- @refsingle
- resource: ManyToOne(Resource, backref=constraints)
- constraint: ManyToOne(Constraint, backref=resourceConstraints)
-
-concept ConstraintDependency derives MetaEnumeration:
- @enum
- CdColocation
- # Q: ?
-
-
-# -- FENCE DEVICES -------------------------------------------------------
-# see https://github.com/ClusterLabs/pacemaker/blob/master/xml/fencing.rng
-
-concept FenceDevice:
- name
- type
- hostname
- @dynamic
- status: FenceDeviceStatus
-
-concept SharedFenceDevice derives FenceDevice:
- @refcollection
- nodesUsing: ManyToMany(Node, backref=fenceDevices)
-
-concept NonSharedFenceDevice derives FenceDevice:
- @refcollection
- nodesUsing: ManyToOne(Node, backref=fenceDevices)
-
-concept FenceDeviceStatus derives MetaEnumeration:
- @enum
- # Q: guessed for now
- FdsActive
- FdsInactive
-
-# sample concrete FenceDevice
-concept APCPowerSwitch derives SharedFenceDevice:
- port
- login
- password
- ...
-# similarly for other fence devices
-
-
-# -- FAILOVER DOMAINS ----------------------------------------------------
-
-concept FailoverDomain:
- name
- prioritized: MetaBool
- restricted: MetaBool
- noFailBack: MetaBool
- @refcollection
- registeredNodes: FailoverDomainRelationship[]
-
-concept FailoverDomainRelationship:
- @refsingle
- node: ManyToOne(Node, backref=failoverDomains)
- failoverDomain: ManyToOne(FailoverDomain, backref=registeredNodes)
11 years, 9 months
[sunzi/development] doc/concepts_syntax.vim: MetaBool as "meta"
by Jan Pokorný
commit 4f17d19cd7b346a6f4a73305087b6b5b7849adb0
Author: Jan Pokorný <jpokorny(a)redhat.com>
Date: Mon Feb 27 15:41:33 2012 +0100
doc/concepts_syntax.vim: MetaBool as "meta"
Signed-off-by: Jan Pokorný <jpokorny(a)redhat.com>
doc/concepts_syntax.vim | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/doc/concepts_syntax.vim b/doc/concepts_syntax.vim
index 3c75016..016bbe5 100644
--- a/doc/concepts_syntax.vim
+++ b/doc/concepts_syntax.vim
@@ -7,7 +7,7 @@ endif
syn keyword conceptStatement concept derives
syn keyword conceptKeyword backref
syn keyword conceptRelation ManyToOne ManyToMany
-syn keyword conceptMeta MetaEnumeration
+syn keyword conceptMeta MetaEnumeration MetaBool
syn match conceptComment "\(#.*\)"
syn match conceptKind "\(@.[^ ]*\)"
11 years, 9 months
[sunzi/development] doc/concepts: add vim syntax file to read easier
by Jan Pokorný
commit 04390284cf80a2d26794b0732a2b522850e224bb
Author: Jan Pokorný <jpokorny(a)redhat.com>
Date: Mon Feb 27 15:36:36 2012 +0100
doc/concepts: add vim syntax file to read easier
Signed-off-by: Jan Pokorný <jpokorny(a)redhat.com>
doc/_vimrc_local.vim | 12 +
doc/concepts | 521 +++++++++++++++++++++++++++++++++++++++++++++--
doc/concepts_syntax.vim | 30 +++
3 files changed, 548 insertions(+), 15 deletions(-)
---
diff --git a/doc/_vimrc_local.vim b/doc/_vimrc_local.vim
new file mode 100644
index 0000000..57e32ee
--- /dev/null
+++ b/doc/_vimrc_local.vim
@@ -0,0 +1,12 @@
+" extra syntax for concepts file
+
+set expandtab
+set tabstop=8
+set softtabstop=4
+set shiftwidth=4
+
+" hack to register syntax + reread file using it's modeline
+if expand('%:t') == 'concepts'
+ au! Syntax concepts source <sfile>:h/concepts_syntax.vim
+ edit!
+endif
diff --git a/doc/concepts b/doc/concepts
index 1d22d98..b536380 100644
--- a/doc/concepts
+++ b/doc/concepts
@@ -1,18 +1,319 @@
-This documents uses hypothetical free-form understandable
-OOP-like language to define concepts in the project and
-the relations amongst them (inspired by Elixir a bit).
-
-Flags used so far:
- <no flag> general attribute
- @one-of contraint for the concept domain: at least one
- specification must fit
- @refcollection collection as a bunch of references to items
- of other concept (aggregation/composition)
- @refsingle single reference to item of other concept
- (item forming aggregation/composition)
- @enum enumeration values
- @dynamic attributes highly dynamic
+# vim: set syntax=concepts: <-- see concepts_syntax.vim
+#
+# This documents uses hypothetical free-form understandable
+# OOP-like language to define concepts in the project and
+# the relations amongst them (inspired by Elixir a bit).
+# There may be not (and probably is not) 1:1 correspondence
+# with how the things are seen by Pacemaker.
+#
+# Flags used so far:
+# <no flag> general attribute
+# @one-of contraint for the concept domain: at least one
+# specification must fit
+# @refcollection collection as a bunch of references to items
+# of other concept (aggregation/composition)
+# @refsingle single reference to item of other concept
+# (item forming aggregation/composition)
+# @enum enumeration values
+# @dynamic attributes highly dynamic
+#
+# Q: contraints for any undefined "singleval", e.g.
+# - UTF-8, 1-63 length, excluding ':'
+
+
+# -- META -----------------------------------------------------------------
+# MetaString and such have obvious meaning, omitted
+# Similarly, known lexical-based concepts marked <CONCEPT> and omitted
+
+
+# -- GENERAL --------------------------------------------------------------
+
+concept HostnameOrIP derives MetaString:
+ @one-of
+ <FQDN>
+ <IPv4> # only single canonical notation (?)
+ <IPv6> # beware: plenty of notations
+
+concept MulticastAddress derives MetaString:
+ @one-of
+ MulticastIPv4
+ MulticastIPv6
+
+concept MulticastIPv4:
+ # Q: restricted to range of D/E-class only?
+
+concept MulticastIPv6:
+ # Q: restrictions here?
+
+concept SyslogFacility derives MetaEnumeration:
+ @enum
+ SfDaemon
+ ...
+
+concept SyslogPriority derives MetaEnumeration:
+ @enum
+
+ SpInfo
+# vim: set filetype=concepts: <-- see concepts_syntax.vim
+# vim: set filetype=concepts: <-- see concepts_syntax.vim
+#
+# This documents uses hypothetical free-form understandable
+# OOP-like language to define concepts in the project and
+# the relations amongst them (inspired by Elixir a bit).
+# There may be not (and probably is not) 1:1 correspondence
+# with how the things are seen by Pacemaker.
+#
+# Flags used so far:
+# <no flag> general attribute
+# @one-of contraint for the concept domain: at least one
+# specification must fit
+# @refcollection collection as a bunch of references to items
+# of other concept (aggregation/composition)
+# @refsingle single reference to item of other concept
+# (item forming aggregation/composition)
+# @enum enumeration values
+# @dynamic attributes highly dynamic
+#
+# Q: contraints for any undefined "singleval", e.g.
+# - UTF-8, 1-63 length, excluding ':'
+
+
+# -- META -----------------------------------------------------------------
+# MetaString and such have obvious meaning, omitted
+# Similarly, known lexical-based concepts marked <CONCEPT> and omitted
+
+
+# -- GENERAL --------------------------------------------------------------
+
+concept HostnameOrIP derives MetaString:
+ @one-of
+ <FQDN>
+ <IPv4> # only single canonical notation (?)
+ <IPv6> # beware: plenty of notations
+
+concept MulticastAddress derives MetaString:
+ @one-of
+ MulticastIPv4
+ MulticastIPv6
+
+concept MulticastIPv4:
+ # Q: restricted to range of D/E-class only?
+
+concept MulticastIPv6:
+ # Q: restrictions here?
+
+concept SyslogFacility derives MetaEnumeration:
+ @enum
+ SfDaemon
+ ...
+
+concept SyslogPriority derives MetaEnumeration:
+ @enum
+ SpInfo
+ SpDebug
+ ...
+
+
+# -- CLUSTER --------------------------------------------------------------
+# see https://github.com/ClusterLabs/pacemaker/blob/master/xml/pacemaker-1.2.rng
+
+concept Cluster:
+ # cluster
+ name
+ # fence
+ fencePostFailDelay
+ fencePostJoinDelay
+ # network
+ networkCommunication: ClusterNetworkCommunication
+ # Pacemaker
+ ...
+ # logging
+ globalLogging: ClusterGlobalLogging
+ otherLogging: ClusterOtherLogging[]
+ @dynamic
+ # Q: is configuration version relevant?
+ configurationVersion
+ status: ClusterStatus
+ @refcollection
+ nodes: Node[]
+
+concept ClusterLogging:
+ # TODO
+
+concept ClusterGlobalLogging derives ClusterLogging:
+ logBuggingMessages: MetaBool
+ syslog: MetaBool
+ syslogFacility: SyslogFacility
+ syslogPriority: SyslogPriority
+
+concept ClusterNetworkCommunication:
+ @one-of
+ CncUDPAuto
+ CncUDPManual
+ # Q: can be more addresses?
+ multicastAddress: MulticastAddress[]
+ CncUDPUnicast
+
+concept ClusterStatus:
+ # Q: ?
+
+# Q: is this relevant after all?
+concept ClusterDaemon:
+ name
+ @dynamic
+ status: ClusterDaemonStatus
+
+# Q: dtto
+concept ClusterDaemonStatus derives MetaEnumeration:
+ @enum
+ # Q: guessed for now
+ CdsRunning
+ CdsNotRunning
+ CdsFailed
+
+
+# -- NODES ---------------------------------------------------------------
+
+concept Node:
+ name: HostnameOrIP
+ id
+ @dynamic
+ uptime
+ status: NodeStatus
+ @refsingle
+ # Q: can node be active in more clusters (running or at least declaratively)?
+ cluster: ManyToOne(Cluster, backref=nodes)
+ @refcollection
+ clusterDaemons: ClusterDaemon[]
+ collocatedResources: Resource[]
+ fenceDevices: FenceDevice[]
+ failoverDomains: FailoverDomainRelationship[]
+
+concept NodeStatus derives MetaEnumeration:
+ @enum
+ # Q: guessed for now
+ NsActive
+ NsInactive
+
+
+# -- RESOURCES -----------------------------------------------------------
+# see https://github.com/ClusterLabs/pacemaker/blob/master/xml/resources-1.2.rng
+
+concept Resource:
+ name
+ class: ResourceClass
+ type: ResourceType
+ provider: ResourceProvider
+ @refsingle
+ location: ManyToOne(Node, backref=collocalatedResources)
+ @refcollection
+ constraints: Constraint[]
+
+concept ResourceClass derives MetaEnumeration:
+ # Q: is this enumeration to be queried at runtime?
+ enum:
+
+concept ResourceType derives MetaEnumeration:
+ # Q: is this enumeration to be queried at runtime?
+ enum:
+
+concept ResourceProvider
+ # Q: also queried at runtime (i.e., dynamical)?
+ name
+
+# sample concrete Resource
+concept ResourceApache derives Resource:
+ serverRoot
+ configFile
+ ...
+# similarly for other resources (not interesting in this context)
+
+
+# -- CONSTRAINTS (aka Resource Dependencies) -----------------------------
+# see https://github.com/ClusterLabs/pacemaker/blob/master/xml/constraints-1.2.rng
+
+concept Contraint:
+ name
+ resourceConstraints: ResourceConstraint[]
+
+concept ResourceConstraint:
+ dependency: ConstrainDependency
+ quantification # Q: ?
+ @refsingle
+ resource: ManyToOne(Resource, backref=constraints)
+ constraint: ManyToOne(Constraint, backref=resourceConstraints)
+
+concept ConstraintDependency derives MetaEnumeration:
+ @enum
+ CdColocation
+ # Q: ?
+
+
+# -- FENCE DEVICES -------------------------------------------------------
+# see https://github.com/ClusterLabs/pacemaker/blob/master/xml/fencing.rng
+
+concept FenceDevice:
+ name
+ type
+ hostname
+ @dynamic
+ status: FenceDeviceStatus
+
+concept SharedFenceDevice derives FenceDevice:
+ @refcollection
+ nodesUsing: ManyToMany(Node, backref=fenceDevices)
+
+concept NonSharedFenceDevice derives FenceDevice:
+ @refcollection
+ nodesUsing: ManyToOne(Node, backref=fenceDevices)
+
+concept FenceDeviceStatus derives MetaEnumeration:
+ @enum
+ # Q: guessed for now
+ FdsActive
+ FdsInactive
+
+# sample concrete FenceDevice
+concept APCPowerSwitch derives SharedFenceDevice:
+ port
+ login
+ password
+ ...
+# similarly for other fence devices
+
+# -- FAILOVER DOMAINS ----------------------------------------------------
+
+concept FailoverDomain:
+ name
+ prioritized: MetaBool
+ restricted: MetaBool
+ noFailBack: MetaBool
+ @refcollection
+ registeredNodes: FailoverDomainRelationship[]
+
+concept FailoverDomainRelationship:
+ @refsingle
+ node: ManyToOne(Node, backref=failoverDomains)
+ failoverDomain: ManyToOne(FailoverDomain, backref=registeredNodes)
+#
+# This documents uses hypothetical free-form understandable
+# OOP-like language to define concepts in the project and
+# the relations amongst them (inspired by Elixir a bit).
+# There may be not (and probably is not) 1:1 correspondence
+# with how the things are seen by Pacemaker.
+#
+# Flags used so far:
+# <no flag> general attribute
+# @one-of contraint for the concept domain: at least one
+# specification must fit
+# @refcollection collection as a bunch of references to items
+# of other concept (aggregation/composition)
+# @refsingle single reference to item of other concept
+# (item forming aggregation/composition)
+# @enum enumeration values
+# @dynamic attributes highly dynamic
+#
# Q: contraints for any undefined "singleval", e.g.
# - UTF-8, 1-63 length, excluding ':'
@@ -54,6 +355,193 @@ concept SyslogPriority derives MetaEnumeration:
# -- CLUSTER --------------------------------------------------------------
+# see https://github.com/ClusterLabs/pacemaker/blob/master/xml/pacemaker-1.2.rng
+
+concept Cluster:
+ # cluster
+ name
+ # fence
+ fencePostFailDelay
+ fencePostJoinDelay
+ # network
+ networkCommunication: ClusterNetworkCommunication
+ # Pacemaker
+ ...
+ # logging
+ globalLogging: ClusterGlobalLogging
+ otherLogging: ClusterOtherLogging[]
+ @dynamic
+ # Q: is configuration version relevant?
+ configurationVersion
+ status: ClusterStatus
+ @refcollection
+ nodes: Node[]
+
+concept ClusterLogging:
+ # TODO
+
+concept ClusterGlobalLogging derives ClusterLogging:
+ logBuggingMessages: MetaBool
+ syslog: MetaBool
+ syslogFacility: SyslogFacility
+ syslogPriority: SyslogPriority
+
+concept ClusterNetworkCommunication:
+ @one-of
+ CncUDPAuto
+ CncUDPManual
+ # Q: can be more addresses?
+ multicastAddress: MulticastAddress[]
+ CncUDPUnicast
+
+concept ClusterStatus:
+ # Q: ?
+
+# Q: is this relevant after all?
+concept ClusterDaemon:
+ name
+ @dynamic
+ status: ClusterDaemonStatus
+
+# Q: dtto
+concept ClusterDaemonStatus derives MetaEnumeration:
+ @enum
+ # Q: guessed for now
+ CdsRunning
+ CdsNotRunning
+ CdsFailed
+
+
+# -- NODES ---------------------------------------------------------------
+
+concept Node:
+ name: HostnameOrIP
+ id
+ @dynamic
+ uptime
+ status: NodeStatus
+ @refsingle
+ # Q: can node be active in more clusters (running or at least declaratively)?
+ cluster: ManyToOne(Cluster, backref=nodes)
+ @refcollection
+ clusterDaemons: ClusterDaemon[]
+ collocatedResources: Resource[]
+ fenceDevices: FenceDevice[]
+ failoverDomains: FailoverDomainRelationship[]
+
+concept NodeStatus derives MetaEnumeration:
+ @enum
+ # Q: guessed for now
+ NsActive
+ NsInactive
+
+
+# -- RESOURCES -----------------------------------------------------------
+# see https://github.com/ClusterLabs/pacemaker/blob/master/xml/resources-1.2.rng
+
+concept Resource:
+ name
+ class: ResourceClass
+ type: ResourceType
+ provider: ResourceProvider
+ @refsingle
+ location: ManyToOne(Node, backref=collocalatedResources)
+ @refcollection
+ constraints: Constraint[]
+
+concept ResourceClass derives MetaEnumeration:
+ # Q: is this enumeration to be queried at runtime?
+ enum:
+
+concept ResourceType derives MetaEnumeration:
+ # Q: is this enumeration to be queried at runtime?
+ enum:
+
+concept ResourceProvider
+ # Q: also queried at runtime (i.e., dynamical)?
+ name
+
+# sample concrete Resource
+concept ResourceApache derives Resource:
+ serverRoot
+ configFile
+ ...
+# similarly for other resources (not interesting in this context)
+
+
+# -- CONSTRAINTS (aka Resource Dependencies) -----------------------------
+# see https://github.com/ClusterLabs/pacemaker/blob/master/xml/constraints-1.2.rng
+
+concept Contraint:
+ name
+ resourceConstraints: ResourceConstraint[]
+
+concept ResourceConstraint:
+ dependency: ConstrainDependency
+ quantification # Q: ?
+ @refsingle
+ resource: ManyToOne(Resource, backref=constraints)
+ constraint: ManyToOne(Constraint, backref=resourceConstraints)
+
+concept ConstraintDependency derives MetaEnumeration:
+ @enum
+ CdColocation
+ # Q: ?
+
+
+# -- FENCE DEVICES -------------------------------------------------------
+# see https://github.com/ClusterLabs/pacemaker/blob/master/xml/fencing.rng
+
+concept FenceDevice:
+ name
+ type
+ hostname
+ @dynamic
+ status: FenceDeviceStatus
+
+concept SharedFenceDevice derives FenceDevice:
+ @refcollection
+ nodesUsing: ManyToMany(Node, backref=fenceDevices)
+
+concept NonSharedFenceDevice derives FenceDevice:
+ @refcollection
+ nodesUsing: ManyToOne(Node, backref=fenceDevices)
+
+concept FenceDeviceStatus derives MetaEnumeration:
+ @enum
+ # Q: guessed for now
+ FdsActive
+ FdsInactive
+
+# sample concrete FenceDevice
+concept APCPowerSwitch derives SharedFenceDevice:
+ port
+ login
+ password
+ ...
+# similarly for other fence devices
+
+
+# -- FAILOVER DOMAINS ----------------------------------------------------
+
+concept FailoverDomain:
+ name
+ prioritized: MetaBool
+ restricted: MetaBool
+ noFailBack: MetaBool
+ @refcollection
+ registeredNodes: FailoverDomainRelationship[]
+
+concept FailoverDomainRelationship:
+ @refsingle
+ node: ManyToOne(Node, backref=failoverDomains)
+ failoverDomain: ManyToOne(FailoverDomain, backref=registeredNodes)
+ SpDebug
+ ...
+
+
+# -- CLUSTER --------------------------------------------------------------
+# see https://github.com/ClusterLabs/pacemaker/blob/master/xml/pacemaker-1.2.rng
concept Cluster:
# cluster
@@ -89,7 +577,7 @@ concept ClusterNetworkCommunication:
CncUDPAuto
CncUDPManual
# Q: can be more addresses?
- multicastAddress MulticastAddress[]
+ multicastAddress: MulticastAddress[]
CncUDPUnicast
concept ClusterStatus:
@@ -135,6 +623,7 @@ concept NodeStatus derives MetaEnumeration:
# -- RESOURCES -----------------------------------------------------------
+# see https://github.com/ClusterLabs/pacemaker/blob/master/xml/resources-1.2.rng
concept Resource:
name
@@ -167,6 +656,7 @@ concept ResourceApache derives Resource:
# -- CONSTRAINTS (aka Resource Dependencies) -----------------------------
+# see https://github.com/ClusterLabs/pacemaker/blob/master/xml/constraints-1.2.rng
concept Contraint:
name
@@ -186,6 +676,7 @@ concept ConstraintDependency derives MetaEnumeration:
# -- FENCE DEVICES -------------------------------------------------------
+# see https://github.com/ClusterLabs/pacemaker/blob/master/xml/fencing.rng
concept FenceDevice:
name
diff --git a/doc/concepts_syntax.vim b/doc/concepts_syntax.vim
new file mode 100644
index 0000000..3c75016
--- /dev/null
+++ b/doc/concepts_syntax.vim
@@ -0,0 +1,30 @@
+" common prologue skipped
+
+if exists("b:current_syntax")
+ finish
+endif
+
+syn keyword conceptStatement concept derives
+syn keyword conceptKeyword backref
+syn keyword conceptRelation ManyToOne ManyToMany
+syn keyword conceptMeta MetaEnumeration
+
+syn match conceptComment "\(#.*\)"
+syn match conceptKind "\(@.[^ ]*\)"
+syn match conceptLexical "\(<[a-zA-Z0-9_]\+>\)"
+
+" blindly borrowed from python.vim
+syn match conceptDefinition "\%(\%(concept\|derives\)\s*\)\@<=\h\%(\w\)*"
+syn match conceptType "\%(\%(:\|(\)\s*\)\@<=\h\%(\w\)*\(\[\]\)\?"
+
+highlight link conceptStatement Statement
+highlight link conceptKeyword Keyword
+highlight link conceptComment Comment
+highlight link conceptKind Define
+highlight link conceptMeta Include
+highlight link conceptRelation Operator
+highlight link conceptDefinition Identifier
+highlight link conceptType Structure
+highlight link conceptLexical String
+
+"let b:current_syntax = "concepts"
11 years, 9 months
[sunzi/development] README.*: better cross-reference, mention yolk
by Jan Pokorný
commit 66bddb0a83c943242ce760f609ee0ebab40fe32a
Author: Jan Pokorný <jpokorny(a)redhat.com>
Date: Mon Feb 27 02:24:34 2012 +0100
README.*: better cross-reference, mention yolk
Signed-off-by: Jan Pokorný <jpokorny(a)redhat.com>
README.contrib | 3 ++-
README.txt | 6 +++++-
2 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/README.contrib b/README.contrib
index bc2842d..32b722a 100644
--- a/README.contrib
+++ b/README.contrib
@@ -10,7 +10,8 @@ I. GIT usage/patches
Get started
-----------
-Follow `README.txt`, Using upstream code, and as a next step, run::
+Follow `README.txt`, Quick start (alternatively Using upstream code),
+and as a next step, run::
git update-index --assume-unchanged sunzi/metadata.py
diff --git a/README.txt b/README.txt
index 9eaa6f4..0dc57b7 100644
--- a/README.txt
+++ b/README.txt
@@ -63,7 +63,7 @@ as usual.
2.3 Quick start (for contribution)
----------------------------------
-Bootstrap script is the fastest way to experiment with sunzi. No external
+Bootstrap script is the fastest way to experiment with `sunzi`. No external
Python library is needed as Python side is well-managed in the isolated
virtualenv environment. This snippet will setup the environment in the
current dir (but feel free to modify as per your needs)::
@@ -81,6 +81,10 @@ the virtualenv environment is used automatically, but you have to activate
it manually (`source bin/activate`, look at virtualenv documentation)
before rerunning the application, etc.
+Note: `yolk`_ allows maintaining packages within the virtualenv environment.
+
+.. _yolk: http://pypi.python.org/pypi/yolk
+
.. ``TODO``
.. Prerequisities for successful build/installation/deployment:
11 years, 9 months
[sunzi/development] sync contrib/vim
by Jan Pokorný
commit 5be4916e122f3977c851448e07a87c472f474448
Author: Jan Pokorný <jpokorny(a)redhat.com>
Date: Sat Feb 25 21:41:25 2012 +0100
sync contrib/vim
Signed-off-by: Jan Pokorný <jpokorny(a)redhat.com>
contrib/vim | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/contrib/vim b/contrib/vim
index 7353504..ce814e6 160000
--- a/contrib/vim
+++ b/contrib/vim
@@ -1 +1 @@
-Subproject commit 735350448122b250c74eee1684c0637fdc2deaa6
+Subproject commit ce814e6795f20e7f69abe6015de9571f360a194b
11 years, 9 months
[sunzi/development] TODO.txt: minor note regarding third-party/init
by Jan Pokorný
commit fcbd6da70f2bd6c0bbe8a94bb96afffd51ac44c8
Author: Jan Pokorný <jpokorny(a)redhat.com>
Date: Sat Feb 25 21:38:52 2012 +0100
TODO.txt: minor note regarding third-party/init
Signed-off-by: Jan Pokorný <jpokorny(a)redhat.com>
TODO.txt | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/TODO.txt b/TODO.txt
index 1efd291..41e7d34 100644
--- a/TODO.txt
+++ b/TODO.txt
@@ -2,3 +2,6 @@
- third-party/init.sh: distinguish "eager get" and "get"
when the latter means "be ok with out-git-cached files"
+ (and better overall approach should be considered, e.g.,
+ way to automatically update to the newest tag, which
+ might be even task for crontab ;)
11 years, 9 months