Skip to content

Change the structure of "main.sfp" #6

@herry13

Description

@herry13

Example specification in "main.sfp"

// the desired state
vm1 isa VM {
    web isa Apache
    db isa Mysql {
        running is true
    }
}
vm1.web.running is true
// constraint at goal state
constraint goal {
    if vm1.web.running then vm1.db.running
}
constraint global {
}

Another example

// the desired state
foo isa Machine {
    address is "foo.domain"
    web isa Apache
    db isa Mysql
}
// mutation
foo.web.running is true
// a constraint
if foo.web.running then foo.db.running
// global constraint
global {
    if foo.web.running then foo.db.running
}

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions