Skip to content
  • This project
    • Loading...
  • Sign in

nexedi / slapos.core

Go to a project
Toggle navigation
Toggle navigation pinning
  • Projects
  • Groups
  • Snippets
  • Help
  • Project
  • Activity
  • Repository
  • Pipelines
  • Graphs
  • Issues 0
  • Merge Requests 14
  • Wiki
  • Network
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Merged
Merge Request !88 opened 2019-01-11 14:41:53 UTC by Alain Takoudjou@alain.takoudjou

format: dump partition resources information if not exists yet

If there is not changes in slapformat.xml, current slapformat will not dump computer resources (as well as partition resources).

For compatibility with olders version of slapformat, dump partition resources if it's not created yet event if the file slapformat.xml didn't change.

Edited 2019-01-14 09:47:28 UTC
Request to merge alain-fix-format into master

Merged by Thomas Gambier 2019-01-14 09:47:28 UTC

The changes were merged into master. The source branch has been removed.

  • Discussion 3
  • Commits 1
  • Changes 1
  • {{ resolvedDiscussionCount }}/{{ discussionCount }} {{ resolvedCountText }} resolved
  • @alain.takoudjou Alain Takoudjou
    @alain.takoudjou commented 2019-01-11 14:44:15 UTC
    Master

    @tomo this is needed for f38436a9091917835da914e3d16238334a9fea80

  • @alain.takoudjou Alain Takoudjou
    @alain.takoudjou

    added 1 commit

    • 47c0b86b - format: dump partition resources information if not exists yet

    Compare with previous version

    2019-01-11 15:03:19 UTC

    added 1 commit

    • 47c0b86b - format: dump partition resources information if not exists yet

    Compare with previous version

    Toggle commit list
  • Avatar
    Toggle discussion
    Thomas Gambier
    @tomo started a discussion on an outdated diff 2019-01-14 09:25:21 UTC
    Resolved by Alain Takoudjou 2019-01-14 09:42:18 UTC
    slapos/format.py
    752 753 def dump(self):
    753 754 """Dump available resources into ~partition_home/.slapos-resource."""
    754 755 file_path = os.path.join(self.path, self.resource_file)
    756 data = _getDict(self)
    757 content = json.dumps(data, sort_keys=True, indent=4)
    758 if os.path.exists(file_path):
    759 with open(file_path, "r") as f:
    760 if f.read() == content:
    761 # dumped resources didn't change
    762 return
    763
    755 764 logger.info("Partition resources saved to {}".format(
    • @tomo Thomas Gambier
      @tomo commented 2019-01-14 09:25:21 UTC
      Master

      If log is in past tense, we should move it after writing the log file. Otherwise, we should have "Saving partition resources to {}"...

    • @alain.takoudjou Alain Takoudjou
      @alain.takoudjou commented 2019-01-14 09:42:17 UTC
      Master

      yes, you are right, I fixed in 7f512d99

  • @alain.takoudjou Alain Takoudjou
    @alain.takoudjou

    added 1 commit

    • 7f512d99 - format: dump partition resources information if not exists yet

    Compare with previous version

    2019-01-14 09:41:26 UTC

    added 1 commit

    • 7f512d99 - format: dump partition resources information if not exists yet

    Compare with previous version

    Toggle commit list
  • @alain.takoudjou Alain Takoudjou
    @alain.takoudjou

    resolved all discussions

    2019-01-14 09:42:18 UTC

    resolved all discussions

    Toggle commit list
  • @alain.takoudjou Alain Takoudjou
    @alain.takoudjou

    unmarked as a Work In Progress

    2019-01-14 09:46:15 UTC

    unmarked as a Work In Progress

    Toggle commit list
  • @tomo Thomas Gambier
    @tomo

    merged

    2019-01-14 09:47:28 UTC

    merged

    Toggle commit list
  • @alain.takoudjou Alain Takoudjou
    @alain.takoudjou

    mentioned in commit 69883b4b

    2019-01-14 09:47:28 UTC

    mentioned in commit 69883b4b

    Toggle commit list
  • Write
  • Preview
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
  • Please register or sign in to post a comment
Assignee
No assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
2
2 participants
Reference: nexedi/slapos.core!88
×

Revert this commit

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.
×

Cherry-pick this commit

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备14008524号